package com.shunwang.caipiao.analysis.numberInterval;

import java.util.ArrayList;
import java.util.List;

import com.shunwang.caipiao.analysis.CaiPiaoAnalysis;
import com.shunwang.caipiao.analysis.DataContext;
import com.shunwang.caipiao.data.container.NumberIntervalContainer;
import com.shunwang.caipiao.vo.NumberIntervalVo;
import com.shunwang.caipiao.vo.SeatNumbers;

public class NumberIntervalAnalysis implements CaiPiaoAnalysis<List<SeatNumbers>> {
	
	@Override
	public List<SeatNumbers> analysis(DataContext context) {
		NumberIntervalContainer container = (NumberIntervalContainer)context.getObj("NumberIntervalContainerKey");
		List<SeatNumbers> list = new ArrayList<SeatNumbers>();
		for(int i=1;i<8;i++){
			List<NumberIntervalVo> volist = container.showAvgNumber(i);
			list.add(new SeatNumbers(i,volist));
		}
		return list;
	}
	

}
